# 最低版本支持
cmake_minimum_required(VERSION 3.0)
# 项目名称
project(Demo VERSION 0.1.0 LANGUAGES C CXX)
# 查询依赖包，获取该包的cmake文件并执行
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PythonLibs REQUIRED)
# 引入头文件路径
include_directories(./head ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
# 获取某目录下的所有元文件
aux_source_directory(lib SRC_LIST)
aux_source_directory(. MAIN_DIR)
# 设置可执行文件生成路径
set(EXECUTABLE_OUTPUT_PATH ./bin)
# 生成可执行文件
add_executable(Demo ${SRC_LIST} ${MAIN_DIR})
# 连接库
target_link_libraries(Demo ${OpenCV_LIBS} ${OpenCV_LIBS} ${EIGEN3_DIRS} ${PYTHON_LIBRARIES})